package com.atstudy.servlet;


import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

/**
 * @version v1.0
 * @description:
 * @author: admin
 * @date: 2023/2/1 14:32
 * @copyright: 博为峰
 */
@WebServlet("/login")
public class LoginServlet extends BaseServlet {

    public String login(HttpServletRequest req, HttpServletResponse resp) {
        //登录成功
        return "forward:/WEB-INF/main.jsp";
    }

    public String logout(HttpServletRequest req, HttpServletResponse resp) {
        return "redirect:/login.jsp";
    }
}
